<?php
namespace app\index\model;
use think\Model;
use think\Db;
use think\Session;
use think\Controller;

class Doc_model
{
	// 文档历史操作
	public function getDoc()
	{
		
		$uid = $_SESSION['think']['username'][0]['user_id'];
        $time =  date('Y-m-d H:i:s',time());

        
        $record = Db::table('cn_file_record')
                ->alias('cfr')
                ->join('cn_archives ca','ca.arc_id = cfr.file_id')
                ->where('cfr.create_user_id',$uid)
                ->field('cfr.file_id,cfr.file_record,cfr.create_time,cfr.file_log_desc,ca.arc_name')
                ->order('create_time desc')
                // ->select();
                ->paginate(10);
        // var_dump($record);die;
        $page = $record->render();

        $info = [
            'record' => $record,
            'page' => $page,
        ];
        
        return $info;
      
	}


   
    
}

?>